---
import ProductDetailView from "../../products/components/ProductDetailView";
export function getStaticPaths() {
  return [
    { params: { productKey: "D3" } },
    { params: { productKey: "P400" } },
    { params: { productKey: "P200" } },
    { params: { productKey: "P221" } },
    { params: { productKey: "D300" } },
    { params: { productKey: "D220" } },
    { params: { productKey: "D201" } },
    { params: { productKey: "D202" } },
    { params: { productKey: "D203" } },
    { params: { productKey: "D221" } },
    { params: { productKey: "D222" } },
    { params: { productKey: "D223" } },
    { params: { productKey: "D301" } },
    { params: { productKey: "Q400" } },
    { params: { productKey: "Q220" } },
    { params: { productKey: "Q221" } },
    { params: { productKey: "Q222" } },
    { params: { productKey: "Q223" } },
    { params: { productKey: "Q301" } },
    { params: { productKey: "Q302" } },
    { params: { productKey: "Q303" } },
    { params: { productKey: "P201" } },
    { params: { productKey: "P202" } },
    { params: { productKey: "P301" } },
    { params: { productKey: "P302" } },
    { params: { productKey: "P303" } },
    { params: { productKey: "B200" } },
    { params: { productKey: "B300" } },
    { params: { productKey: "Q224" } },
    { params: { productKey: "DB2" } },
    { params: { productKey: "DB4" } },
    { params: { productKey: "C2" } },
    { params: { productKey: "PF1" } },
    // network camera
    { params: { productKey: "BW45PWDI3" } },
    { params: { productKey: "BW45PWDI3S" } },
    // simCam
    { params: { productKey: "A220" } },
    { params: { productKey: "A222" } },
    { params: { productKey: "A400" } },
    { params: { productKey: "A402" } },
  ];
}
const { productKey } = Astro.params;

import Layout from "../../../layouts/Layout.astro";
import Footer from "../../../components/Footer";
import Navbar from "../../../components/Navbar/";

// Get the current language from URL params or cookies
interface Props {
  lang: string;
}

const { lang = "ar" } = Astro.props;

const currentLang = lang === "ar" ? "ar" : "en";
const isRtl = currentLang === "ar";
// Define configurable menu items with translations
// const menuItems = [];
const menuItems = [
  {
    en: "Home",
    ar: "الرئيسية", // 正确翻译：首页
    url: "/",
    activeName: "home",
  },
  {
    en: "Product",
    ar: "المنتج", // 正确翻译：产品
    url: "/products/",
    activeName: "product",
  },
  {
    en: "App & Services",
    ar: "التطبيقات والخدمات", // 正确翻译：应用与服务
    url: "/appAndServices/",
    activeName: "appAndServices",
  },
  {
    en: "About us",
    ar: "عنّنا", // 正确翻译：关于我们
    url: "/aboutUs/",
    active: false,
    activeName: "aboutUs",
  },
];
---

<Layout title="icam365" lang={currentLang}>
  <!-- <Header /> -->
  <main class={isRtl ? "rtl" : "ltr"}>
    <Navbar logo="tapo" menuItems={menuItems} currentLanguage={currentLang} client:only />
    <ProductDetailView lang={currentLang} productKey={productKey} client:only />
    <Footer lang={lang} client:only />
  </main>
</Layout>
